package org.zxp.javacheck.InnerClass.memberinnerclass;

/**
 * @program: effectiveJava
 * @description:
 * @author: X-Pacific zhang
 * @create: 2019-08-21 11:42
 **/
public class MemberInnerClass {
    private Inner inner = new Inner();

    public Inner getInnerInstance(){
        return new Inner();
    }

    public void doing(){
        new Inner().show();
        getInnerInstance().show();
        inner.show();
    }


//    private class Inner{//只能外部类访问了
    public class Inner{
        public void show(){
            System.out.println("我是成员内部类，路径是："+this.getClass().getName()+" hashcode："+this.hashCode());
        }
    }
}
